package com.xlserver.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xlserver.util.model.CounselorInfo;
import lombok.Data;

import java.util.Map;

@Data
@TableName("counselor_info")
public class Counselor {

    @TableId(value = "cid",type = IdType.AUTO)
    private Integer cid;

    @TableField("cName")
    private String name;

    @TableField("cUsername")
    private String username;

    @TableField("cAverageGrade")
    private double averageGrade;

    @TableField("cQuestsCompleted")
    private Integer questsCompleted;

    @TableField("cSchedule")
    private String schedule;

    @TableField("cProfilePhoto")
    private String profilePhoto;

    @TableField("cConsultationTime")
    private Integer consultationTime;

    @TableField("cGender")
    private int gender;

    @TableField("cTitle")
    private String title;

    @TableField("cJob")
    private String job;

    @TableField("cEmail")
    private String email;

    @TableField("cIdNumber")
    private String idNumber;

    @TableField("cAge")
    private int age;

     @TableField("cPhoneNum")
    private String phoneNum;

    public Counselor() {
    }

    public Counselor(CounselorInfo counselorInfo) {
        this.name = counselorInfo.getName();
        this.gender = counselorInfo.getGender();
        this.title = counselorInfo.getTitle();
        this.job = counselorInfo.getJob();
        this.email = counselorInfo.getEmail();
        this.idNumber = counselorInfo.getIdNumber();
        this.age = counselorInfo.getAge();
        this.phoneNum = counselorInfo.getPhoneNum();
        this.schedule = counselorInfo.getSchedule();
    }
}
